package cate.common.table.call.sheet;

import cate.common.table.ESheet;
import cate.common.table.call.row.CallCheatRow;

public class CallCheatSheet extends ESheet<CallCheatRow> {
    @Override
    public String getSheetName() {
        return "保底配置";
    }

    @Override
    protected CallCheatRow buildRow() {
        return new CallCheatRow();
    }

    /**
     * 根据召唤模式和召唤次数判断是否需要作弊
     */
    public CallCheatRow getRow(int callMode, int times) {
        for (CallCheatRow row : list) {
            //循环的话
            if (callMode == row.callMode && row.times <= times) {
                return row;
            }
        }
        return null;
    }


    /**
     *取得召唤模式下保底次数配置的row
     */
    public CallCheatRow getRow(int callMode) {
        for (CallCheatRow row : list) {
            //循环的话
            if (callMode == row.callMode) {
                return row;
            }
        }
        return null;
    }
}
